package com.xnj.transform_stream;

import java.io.*;

public class Test1 {
    public static void main(String[] args) {
        try (
//                FileReader frd = new FileReader("src/转换流utf8.txt");
                FileReader frd = new FileReader("src/转换流gbk.txt"); // 发生乱码
                BufferedReader br = new BufferedReader(frd);
                ){

            String line ;
            while ((line = br.readLine())!=null){
                System.out.println(line);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
